package test

import (
	"codejy/store"
	"codejy/structdef"
)

// key 实例地址,value 值

type TypeSingle struct {
	Addr        string
	ThreadStore *structdef.ThreadStore
}

func (f *TypeSingle) CreateTypeDefault(addr string, threadStore *structdef.ThreadStore, parameter ...string) {
	fUtil := &TypeSingle{
		Addr:        addr,
		ThreadStore: threadStore,
	}
	store.AddTypeDefaultInstanceStore(threadStore, f.GetTypeName(), addr, fUtil)
}
func (f *TypeSingle) GetData() interface{} {
	return nil
}

func (a *TypeSingle) ToStr() string {
	return ""
}
func (a *TypeSingle) ParameterProcessing(parameter []string) []string {
	return parameter
}
func (f *TypeSingle) GetDef() string {
	return `
		type share Single{
			def init{
				core&CreateTypeDefault()
			}
		
		}
	`
}

func init() {
	//RegisterTypeDefault(&TypeSingle{})
}
func (f *TypeSingle) GetTypeName() string {
	return "Single"
}
